<?php

require_once 'MainPageWidget.php';
class CreateCommunityWidget extends MainPageWidget {
	public $title = '';
  public $widget_view = 'WG_CreateCommunityWidget';
  public $ui_configurable = false;
  //public $ui_settingsjs = "widget/hp/plaintext.js"; // кнопки в меню настроек виджета

	public function Render() {
    if ( isset($this->ctx->mm->aa->acl_data['user'])
    && !empty($this->ctx->mm->aa->acl_data['user']) ) {
      $content['user'] = $this->ctx->mm->aa->acl_data['user'];
    }
    
		$content['title'] = $this->getParam("title");
    
		$this->content = $content;

		return $this;
  }
  
  public function settingsForm() {
		if ( !isset($this->params) || !isset($this->params['title']) ) {
			$this->params['title'] = $this->title;
		}
		
		//return $this->params;
	}
  
  public function setParams( $params ) {
    foreach ( $params as $key=>$val ) {
      if ( isset($this->$key) ) {
        $this->$key = $val;
      }
    }
  }
}